package com.starhub.api.docarchive.result;

import com.starhub.api.docarchive.vo.DocArchiveBaseVO;

import lombok.Data;

/**   
 * 系统知识库操作返回结果
 * @version: V1.0
 * @author: liuhf
 * @time 2025-05-18
 */
@Data
public class DocArchiveDealResult {
    private boolean success;
    private String message;
    private Long id;
    private DocArchiveBaseVO data;

    public static DocArchiveDealResult success(Long id) {
        DocArchiveDealResult result = new DocArchiveDealResult();
        result.setSuccess(true);
        result.setId(id);
        return result;
    }

    public static DocArchiveDealResult success(Long id, DocArchiveBaseVO data) {
        DocArchiveDealResult result = new DocArchiveDealResult();
        result.setSuccess(true);
        result.setId(id);
        result.setData(data);
        return result;
    }

    public static DocArchiveDealResult fail(String message) {
        DocArchiveDealResult result = new DocArchiveDealResult();
        result.setSuccess(false);
        result.setMessage(message);
        return result;
    }
} 